virtualFolder
![]() ![]() |
This prefix is added after the host name definition and is used to resolve sites according to incoming URLs. This is the second attribute, along with the hostName, which is used to define a unique site.
For example:
<site
name="test"
hostName="mysite.com"
virtualFolder="/virtual"
...
The website that is defined above must match the following URL:
http://mysite.com/virtual
Default value: “/”.
To configure a website with a virtual folder:
- Define mysite.com in the hosts file.
- Set both the virtualFolder and physicalFolder attributes to the same value (you don’t need to create a physical folder and place the default.html in it).
For example, to configure http://mysite.com/test, you need to have the following site definition in web.config:<site name="website" virtualFolder="/test" physicalFolder="/test" >
![](/SdnArchive/images/sdn5/prev.gif)
![](/SdnArchive/images/sdn5/next.gif)